//package com.rest.demo.Controller;
//
//import com.alibaba.fastjson.JSONObject;
//import com.rest.demo.Service.Dysmtl;
//import com.rest.demo.repository.UserInfo;
//import lombok.Data;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServlet;
//
//@Data
//@RestController
//@RequestMapping("/ty")//整个路由路径
//
//public class ServerController extends HttpServlet {
//
//
//    @RequestMapping(value = "/hello")
//    public String test() {
//        return "hello,world";
//    }
//
//    //请求api
//    @RequestMapping(value = "/User")
//    public UserInfo User(String Access_token, String Id) {
//        UserInfo user = new UserInfo();
//        user.setAccess_token(Access_token);
//        user.setUserId(Id);
////        Dysmtl.GetHealthInfo("赖韬","510682198707070031");
//        return user;
//    }
//
//
//
//    //请求api2 可以通过前端请求
//    @RequestMapping(value = "/User2")
//    public JSONObject User2(String Access_token, String Id) {
//        JSONObject UserHealth = new Dysmtl().GetHealthInfo(Access_token,Id);
//        return  UserHealth;
//    }
//
//
//
//    @RequestMapping(value = "/testJsonx")
//    public TestClass hellox(@RequestBody TestClass json) {
//        return json;
//    }
//
//    @RequestMapping(value = "/testResXml", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_XML_VALUE)
//    public TestClass hello(@RequestBody TestClass json) {
//        return json;
//    }
//
//    @PostMapping(value = "/test", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
//    public TestClass hello1(@RequestBody TestClass json) {
//        return json;
//    }
//
//    @RequestMapping(value = "/test", consumes = MediaType.APPLICATION_XML_VALUE, produces = MediaType.APPLICATION_XML_VALUE)
//    public TestClass hello2(@RequestBody TestClass json) {
//        return json;
//    }
//
//    @RequestMapping(value = "/testReqJson", consumes = MediaType.APPLICATION_XML_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
//    public TestClass hello3(@RequestBody TestClass json) {
//        return json;
//    }
//
//
//    public class TestClass {
//        private String key;
//        private String value;
//
//
////        public String getKey() {
////            return key;
////        }
////
////        public void setKey(String key) {
////            this.key = key;
////        }
////
////        public String getValue() {
////            return value;
////        }
////
////        public void setValue(String value) {
////            this.value = value;
////        }
//    }
//
//
//}
//
//
